<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Welcome to <%= title %></title>

    <!-- Bootstrap Core CSS -->
    <link href="/stylesheets/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/stylesheets/metisMenu.min.css" rel="stylesheet">


    <!-- Custom CSS -->
    <link href="/stylesheets/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/stylesheets/font-awesome.min.css" rel="stylesheet" type="text/css">

    <link rel="stylesheet" href="/stylesheets/style.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">

            <%- include('public_header') -%>
            <%- include('public_sidebar') -%>
        </nav>

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">添加分类</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="row">
                        <form role="form" method="post" action="/admin/category/add" >
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label >上级分类</label>
                                    <select  class="form-control" name="parent_id">
                                        <option value="0">顶级分类</option>
                                        <% categories.forEach(function(category){ %>
                                            <option value="<%= category._id %>"><%= category.name %></option>
                                        <% }) %>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>分类名称</label>
                                    <input class="form-control" name="name">
                                    <p class="help-block"></p>
                                </div>
                                <div class="form-group">
                                    <label>排序</label>
                                    <input class="form-control" name="order_sort" value="1">
                                    <p class="help-block"></p>
                                </div>
                                <div class="form-group">
                                    <label class="checkbox-inline">
                                      <input type="checkbox" id="inlineCheckbox3" name="is_show" checked="checked" value="1"> 启用
                                    </label>
                                </div>
                                <div class="form-group">
                                    <label class="checkbox-inline">
                                      <input type="checkbox" id="inlineCheckbox3" name="is_nav" checked="checked" value="1"> 加入导航栏
                                    </label>
                                </div>
                                <div class="form-group">
                                    <label>摘要</label>
                                    <textarea class="form-control" rows="10"></textarea>
                                </div>
                                <button type="submit" class="btn btn-primary">发布</button>
                                <button type="reset" class="btn btn-default">取消</button>
                            </div>
                        </form>
                    </div>
                            <!-- /.row (nested) -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="/javascripts/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/javascripts/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/javascripts/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="/javascripts/sb-admin-2.js"></script>
    
</body>

</html>
